﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace TerrariaSVCv2 {
    public class SplunkWrapper {

        public struct SplunkArgs {
            public string Message;
            public string HostIP;
            public int Port;
        }
        
        public static void SendToSplunk(string Message, string HostIP, int Port) {
            try {
                SplunkTCP.TCPSender sender = new SplunkTCP.TCPSender();
                sender.Send(HostIP, Port, Message);
            } catch (Exception err) { }
        }

        public static void SendToSplunk(object state) {
            SplunkArgs args = (SplunkArgs)state;
            try {
                SplunkTCP.TCPSender sender = new SplunkTCP.TCPSender();
                sender.Send(args.HostIP, args.Port, args.Message);
            } catch (Exception err) { }
        }

    }

    
}
